Skip to content

chore(vm): refresh runtime defaults and hardening - #3446

Merged
elezar merged 1 commit into
mainfrom
chore-vm-runtime-refresh/dn
Sep 21, 2026
Merged

elezar merged 1 commit into
mainfrom
chore-vm-runtime-refresh/dn

Conversation

@drew

@drew drew commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Refresh the VM runtime to libkrunfw v5.6.1, whose Makefile pins Linux 6.12.109 (not 6.12.110), and use the multiarch NGC Ubuntu 24.04 image as the VM driver's default sandbox/rootfs image.

Related Issue

No issue required: this is a maintainer-directed, scoped VM runtime dependency and default refresh.

Changes

  • Pin libkrunfw to commit 617938cf2ae9a3a0e5696d23a5d6252cd7a1ef4f (v5.6.1 / Linux 6.12.109).
  • Remove dead VM base, agent-sandbox, and deprecated community sandbox image pins.
  • Default only the VM driver, its local-dev workflow, and VM E2E workflow to nvcr.io/nvidia/base/ubuntu:24.04; Docker, Podman, and Kubernetes defaults are unchanged.
  • Enable hardened usercopy, zero-initialized stacks, init-on-allocation, and slab freelist randomization in the VM kernel.
  • Deliberately keep CONFIG_INIT_ON_FREE_DEFAULT_ON disabled because of its runtime cost, and verify the merged config preserves that setting.
  • Update the VM configuration reference, compute-driver guide, and driver README.

Testing

  • git diff --check
  • bash -n tasks/scripts/gateway-vm.sh e2e/rust/e2e-vm.sh tasks/scripts/vm/build-libkrun.sh
  • cargo fmt --check
  • cargo test -p openshell-gateway vm::tests (25 passed)
  • mise run pre-commit
  • Linux ARM64 build of libkrunfw v5.6.1 / Linux 6.12.109 and libkrun v1.17.4
  • Verified the merged Linux config enables all four requested hardening options and explicitly leaves init-on-free unset
  • VM E2E test (not run; no VM gateway was started)

Checklist

  • Follows Conventional Commits
  • Commit is signed off (DCO)

@github-actions

Copy link
Copy Markdown

Comment thread crates/openshell-driver-vm/runtime/pins.env
Comment thread tasks/scripts/gateway-vm.sh
Comment thread crates/openshell-driver-vm/runtime/pins.env
Comment thread crates/openshell-driver-vm/README.md
elezar
elezar previously approved these changes Sep 18, 2026
@elezar

elezar commented Sep 18, 2026

Copy link
Copy Markdown
Member

I see that #3451 is related. It may be good to stack on that.

@elezar
elezar force-pushed the chore-vm-runtime-refresh/dn branch from ebbaa9d to 98ca518 Compare September 18, 2026 13:06
@copy-pr-bot

copy-pr-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@elezar
elezar force-pushed the chore-vm-runtime-refresh/dn branch from 98ca518 to a4c8cea Compare September 18, 2026 13:08
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@elezar
elezar force-pushed the chore-vm-runtime-refresh/dn branch from a4c8cea to 07ae496 Compare September 18, 2026 14:40
@elezar
elezar enabled auto-merge September 18, 2026 14:42
@elezar
elezar added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit dee4f98 Sep 21, 2026
60 checks passed
@elezar
elezar deleted the chore-vm-runtime-refresh/dn branch September 21, 2026 10:54
@EmilienM

Copy link
Copy Markdown
Contributor

Heads-up: VM E2E (rust-vm-managed and rust-vm-external-driver) has been failing on every PR that runs it since this merged. Sandbox creation aborts in the guest with:

FATAL: prepared image disk missing /image-rootfs
PR VM E2E Includes #3446 Includes #3451 (libkrun bump)
#3273 pass no yes
#3401 fail yes yes
#3384 fail yes yes
#3520 fail yes yes

The most likely trigger is the switch to nvcr.io/nvidia/base/ubuntu:24.04 in e2e/rust/e2e-vm.sh and DEFAULT_VM_SANDBOX_IMAGE. The symptom matches #2358 exactly: registry image prep leaves a disk without /image-rootfs for any image other than the bootstrap one. The kernel hardening options are the other change on that path; I haven't bisected.

Since the gateway default changed too, VM driver users on the default image may hit the same failure. Could we revert the image switch until #2358 is fixed, or revive #2360?

@EmilienM

Copy link
Copy Markdown
Contributor

@drew follow-up on the VM E2E breakage: the CI logs trace it to the image switch, not the kernel options. --from base no longer matches the bootstrap image, so it goes through registry prep and hits #2358. Fix is up in #3524.

With that fix, conformance passes locally, but there's a second regression hiding behind it: both host_gateway_alias tests fail with curl: command not found. They run in the new default image, and nvcr.io/nvidia/base/ubuntu:24.04 ships without curl (or wget/python3). CI never reached them because conformance failed first.

Two easy options: have those tests use --from base, or keep the new gateway default but point SANDBOX_IMAGE in e2e/rust/e2e-vm.sh back at the community image. Happy to take either, just let me know which you prefer.

@EmilienM

Copy link
Copy Markdown
Contributor

@drew quick update: vm_corporate_proxy had the same problem (its workload runs python3, which the new image doesn't ship either). Since CI was blocked on it, I went with the --from base option for both test files and pushed it to #3524 as a separate commit, so it's easy to drop if you'd rather go another way. Full e2e:vm passes locally with the Ubuntu default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants